DDD の trilemma
trilemma
model の完全性 (domain model encapsulation (a.k.a. completeness))
When all the application’s domain logic is located in the domain layer, i.e. not fragmented.
application の demain logic が、domain layer 等の 1 箇所に纏まって記述される
model の純粹性 (domain model purity)
When the domain layer doesn’t have out-of-process dependencies.
domain layer が外部に依存しない
application の性能 (performance)
which is defined by the presence of unnecessary calls to out-of-process dependencies.
外部に依存した不要な處理を呼び出さない
可能な道
完全性 + 純粹性 : Push all external reads and writes to the edges of a business operation
外部の讀み書きを全て business 作業の境界へ追い遣る
完全性 + 性能 : Inject out-of-process dependencies into the domain model
純粹性 + 性能 : Split the decision-making process between the domain layer and controllers
With this approach, you need to introduce decision-making points (business logic) in the controller.
decision-making な處理を domain layer と controller とに分割する